export interface SwiperData{
  name:string;
  img:string;
}
export interface LoginData{
  username:string;
  password:string
}

export interface RegisterData{
  username:string;
  password:string;
}

export interface iconData{
  img:string,
  name:string,
}
export interface CourseListItem{
  title:string
  img:string
  id:number
  chapterName:string
  nickName:string
  likeNum:number
  count:number
  chapterVideoTotal:string
}

export interface CourseListReq{
  way:number
  catId:number
  title:string
  pageNum:number
  pageSize:number
}
export interface chapter{
  id:number
  name:string
  type:string
  context:string
  video:string
}
export interface Teacher{
  id:number
  nickName:string
}
export interface Course{
  title:string
  img:string
  intro:string
  likeNum:number
  id:number
  chapterName:string
  chapterNum:number
  createTime:string
}

export interface courseDetailDate{
  theater:Teacher
  chapters:Array<chapter>
  eduCourse: Course
}

export interface userData{
  nickName:string;
  avatar:string;
  userName:string;
  userId:number
}
export interface Comment{
  id: number,
  content: string,
  createTime: string,
  uid: number,
  cid: number,
  chapterId: number,
  likeNum: number,
  starNum: number,
  nikeName: string
}
export interface noticeData{
  noticeTitle:string;
  noticeContent:string;
}
export interface userCourse{
  uid:number,
  cid:number
}
export interface hotCourse{
  title:string,
  img:string,
  id:number,
  avatar:string,
  nickName:string,
  chapter_num:string
}

export interface LikeItem {
  userId: number;
  targetId: number;
  targetType: number; // 1:评论 2:笔记
  actionType: number; // 1:点赞
  createTime: string;
  content: string;
  courseTitle: string;
  courseId: number;
}

export interface ToggleInteractionData {
  targetId: number;      // 目标ID（如评论/笔记ID）
  targetType: number;     // 目标类型：1=评论，2=笔记
  actionType: number;     // 操作类型：1=点赞，2=收藏
}

// 发布评论请求类型
export interface PublishCommentData {
  cid: number;           // 课程ID
  content: string;       // 评论内容
  starNum: number;       // 星级评分（1-5）
}

// 发布笔记请求类型
export interface PublishNoteData {
  cid: number;           // 课程ID
  chapterId?: number;     // 章节ID（可选）
  note: string;           // 笔记内容
}